<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
</head>
<body id="body">
<input id="text1" type="text" aria-disabled="true" size=20>
<input id="text2" type="text" aria-disabled="false" size=20>
<div role="group" id="group1" aria-disabled="true">
  <div role="group">
    <a id="link1" href="#">link</a>
    <button id="button1" type="submit" aria-disabled="false">submit</button>
  </div>
</div>
<div id="treeitem1" role="treeitem" tabindex="-1" aria-disabled="true">treeitem</div>
<div id="option1" role="option" tabindex="-1" aria-disabled="true">option</div>
<div id="tab1" role="tab" tabindex="-1" aria-disabled="true">tab</div>
<div id="gridcell1" role="gridcell" tabindex="-1" aria-disabled="true">gridcell</div>
<div id="checkbox1" role="checkbox" tabindex="-1" aria-disabled="true">checkbox</div>
<p id="description"></p>
<div id="console"></div>

<script>

test((t) => {
    var textField = accessibilityController.accessibleElementById("text1");
    assert_equals(textField.restriction, "disabled");

    textField = accessibilityController.accessibleElementById("text2");
    assert_equals(textField.restriction, "none");

    var group = accessibilityController.accessibleElementById("group1");
    assert_equals(group.restriction, "disabled");

    var link = accessibilityController.accessibleElementById("link1");
    assert_equals(link.restriction, "disabled");

    var button = accessibilityController.accessibleElementById("button1");
    assert_equals(button.restriction, "none");

    var treeitem = accessibilityController.accessibleElementById("treeitem1");
    assert_equals(treeitem.restriction, "disabled");

    var option = accessibilityController.accessibleElementById("option1");
    assert_equals(option.restriction, "disabled");

    var tab = accessibilityController.accessibleElementById("tab1");
    assert_equals(tab.restriction, "disabled");

    var gridcell = accessibilityController.accessibleElementById("gridcell1");
    assert_equals(gridcell.restriction, "disabled");

    var checkbox = accessibilityController.accessibleElementById("checkbox1");
    assert_equals(checkbox.restriction, "disabled");
    }, "This tests that the aria-disabled attribute works. The text field should not be enabled.");

</script>

</body>
</html>
